package com.wangxiang.common.utils;

import javax.xml.soap.SAAJResult;
import java.util.ArrayList;
import java.util.List;

public class StrUtil {
    //模糊查询多模糊工具
    public String likeStr(String like){
        ArrayList<String> strings = new ArrayList<>();
        for (int i = 0; i < like.length(); i++) {
            if (i==0){
                strings.add("%"+like.charAt(i)+"%");
            }else {
                strings.add(like.charAt(i)+"%");
            }
        }
        String s = strings.toString();
        String replace = s.replace(", ", "");
        String replace1 = replace.replace("[", "");
        String replace2 = replace1.replace("]", "");
        return replace2;
    }

}
